// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 修改字典类型 PUT /api/system/dict/type */
export async function dictionaryTypeEditUsingPUT(
  body: API.SysDictType,
  options?: { [key: string]: any },
) {
  return request<Record<string, any>>('/api/system/dict/type', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 新增字典类型 POST /api/system/dict/type */
export async function dictionaryTypeAddUsingPOST(
  body: API.SysDictType,
  options?: { [key: string]: any },
) {
  return request<Record<string, any>>('/api/system/dict/type', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除字典类型 DELETE /api/system/dict/type/${param0} */
export async function dictionaryTypeRemoveUsingDELETE(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.dictionaryTypeRemoveUsingDELETEParams,
  options?: { [key: string]: any },
) {
  const { dictIds: param0, ...queryParams } = params;
  return request<Record<string, any>>(`/api/system/dict/type/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 查询字典类型详细 GET /api/system/dict/type/${param0} */
export async function dictionaryTypeGetInfoUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.dictionaryTypeGetInfoUsingGETParams,
  options?: { [key: string]: any },
) {
  const { dictId: param0, ...queryParams } = params;
  return request<Record<string, any>>(`/api/system/dict/type/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 导出字典类型列表 POST /api/system/dict/type/export */
export async function dictionaryTypeExportUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.dictionaryTypeExportUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<any>('/api/system/dict/type/export', {
    method: 'POST',
    params: {
      ...params,
      params: undefined,
      ...params['params'],
    },
    ...(options || {}),
  });
}

/** 获取字典类型列表 GET /api/system/dict/type/list */
export async function dictionaryTypeListUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.dictionaryTypeListUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.TableDataInfo>('/api/system/dict/type/list', {
    method: 'GET',
    params: {
      ...params,
      params: undefined,
      ...params['params'],
    },
    ...(options || {}),
  });
}

/** 获取字典选择框列表 GET /api/system/dict/type/optionSelect */
export async function dictionaryTypeOptionSelectUsingGET(options?: { [key: string]: any }) {
  return request<Record<string, any>>('/api/system/dict/type/optionSelect', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 刷新字典缓存 DELETE /api/system/dict/type/refreshCache */
export async function dictionaryTypeRefreshCacheUsingDELETE(options?: { [key: string]: any }) {
  return request<Record<string, any>>('/api/system/dict/type/refreshCache', {
    method: 'DELETE',
    ...(options || {}),
  });
}
